from celery import Celery
from django.conf import settings
import os


"""
celery配置文件
"""
#1.设置环境变量
os.environ.setdefault('DJANGO_SETTINGS_MODULE','dashopt.settings')
#创建应用
app = Celery('dashopt',broker="redis://:@127.0.0.1:6379/15")
#设置自动发现异步任务
app.autodiscover_tasks(settings.INSTALLED_APPS)
